﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="gio_hang.ascx.cs" Inherits="eDream.Page.gio_hang" %>
<%@ Register Assembly="DevExpress.Web.v12.2, Version=12.2.5.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" Namespace="DevExpress.Web.ASPxRoundPanel" TagPrefix="dx" %>
<%@ Register Assembly="DevExpress.Web.v12.2, Version=12.2.5.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" Namespace="DevExpress.Web.ASPxPanel" TagPrefix="dx" %>
<%@ Register Assembly="DevExpress.Web.v12.2, Version=12.2.5.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" Namespace="DevExpress.Web.ASPxCallbackPanel" TagPrefix="dx" %>
<%@ Register Assembly="DevExpress.Web.v12.2, Version=12.2.5.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" Namespace="DevExpress.Web.ASPxEditors" TagPrefix="dx" %>
<%@ Register Assembly="DevExpress.Web.v12.2, Version=12.2.5.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" Namespace="DevExpress.Web.ASPxGridView" TagPrefix="dx" %>
<div style="width: 100%; margin-top: 5px; height: 100%; color: #3b3b3b">

    <div class="content_">
        <div class="list-rands-over1">
            <div class="list-rands2">
                <div style="height: 10px; width: 100%"></div>
        
                            <asp:Panel ID="pn1" runat="server">
                                <dx:ASPxLabel ID="lbGiohang" runat="server" Text="Đơn hàng" Font-Bold="true" Font-Size="20pt"></dx:ASPxLabel>
                                <br />

                                <div style="height: 10px; width: 100%"></div>
                                <div class="clear"></div>


                                <dx:ASPxCallbackPanel ID="ASPxCallbackPanel2" runat="server" ClientInstanceName="ASPxCallbackPanel2" Width="100%" OnCallback="ASPxCallbackPanel2_Callback">
                                    <PanelCollection>
                                        <dx:PanelContent>
                                            <dx:ASPxGridView ID="grvCart" runat="server" Theme="DevEx" Width="98%" KeyFieldName="ID" OnRowDeleting="grvCart_RowDeleting" OnAfterPerformCallback="grvCart_AfterPerformCallback" 
                                                >
                                                <Columns>
                                                            <dx:GridViewDataTextColumn Caption=" " Name="image" FieldName="image" VisibleIndex="0" Width="105px">
                                                                <DataItemTemplate>
                                                                    <asp:HiddenField ID="hdfID" runat="server" Value='<%#Eval("ID") %>' />
                                                                    <asp:HiddenField ID="hdfImage" runat="server" Value='<%#Eval("image") %>' />
                                                                    <dx:ASPxImage ID="img" runat="server" ImageUrl='<%#String.Format("{0}/Image/product/{1}",pathUrl,Eval("image")) %>' Width="100px" Height="100px"></dx:ASPxImage>
                                                                </DataItemTemplate>
                                                            </dx:GridViewDataTextColumn>
                                                            <dx:GridViewDataTextColumn Caption="Sản phẩm" Name="iProName" FieldName="iProName" VisibleIndex="1" Width="200">
                                                                <DataItemTemplate>
                                                                    <a href='<%#String.Format("{0}/San-pham/{1}/{2}.html",pathUrl,Eval("ID"),Utility1.WebUtils.convertToUnSign3(Eval("iProName").ToString())) %>'>
                                                                        <dx:ASPxLabel ID="lbsanpham" runat="server" Text='<%#Eval("iProName") %>' Font-Bold="true"></dx:ASPxLabel>
                                                                    </a>
                                                                </DataItemTemplate>
                                                            </dx:GridViewDataTextColumn>
                                                            <dx:GridViewDataSpinEditColumn Caption="Số lượng" Name="soluong" FieldName="soluong" VisibleIndex="2" Width="100px">
                                                                <DataItemTemplate>
                                                                    <dx:ASPxSpinEdit ID="spSoluong" runat="server" ClientInstanceName="spSoluong" NumberType="Integer" Number='<%# (int)Eval("soluong") %>' MinValue="1" MaxValue="100" Width="50px">
                                                                        <ClientSideEvents ValueChanged="function(s, e) {ASPxCallbackPanel2.PerformCallback();}" />
                                                                    </dx:ASPxSpinEdit>
                                                                </DataItemTemplate>
                                                            </dx:GridViewDataSpinEditColumn>
                                                            <dx:GridViewDataTextColumn Caption="Đơn giá" Name="dongia" FieldName="iDongiamoi" VisibleIndex="3" PropertiesTextEdit-DisplayFormatString="C" Width="100px">
                                                                <DataItemTemplate>
                                                                    <dx:ASPxLabel ID="lbDongia" runat="server" Text='<%#Eval("iDongiamoi") %>'>
                                                                    </dx:ASPxLabel>
                                                                </DataItemTemplate>
                                                            </dx:GridViewDataTextColumn>
                                                            <dx:GridViewDataTextColumn Caption="Thành tiền" Name="tota" FieldName="tota" VisibleIndex="4" Width="150px">
                                                                <DataItemTemplate>
                                                                    <dx:ASPxLabel ID="lbtota" runat="server" Text=""></dx:ASPxLabel>
                                                                </DataItemTemplate>
                                                                <FooterTemplate>
                                                                    <dx:ASPxLabel ID="lbtota1" runat="server" Text="" Font-Bold="true" ForeColor="Red"></dx:ASPxLabel>
                                                                </FooterTemplate>
                                                            </dx:GridViewDataTextColumn>
                                                            <dx:GridViewCommandColumn DeleteButton-Visible="true" DeleteButton-Text="Xóa" Caption=" " VisibleIndex="5">
                                                            </dx:GridViewCommandColumn>
                                                </Columns>
                                                <SettingsBehavior AllowFocusedRow="false" AllowSelectByRowClick="true" AllowSort="false"/>
                                                <Settings ShowFooter="true"   />
                                               

                                            </dx:ASPxGridView>

                                        </dx:PanelContent>
                                    </PanelCollection>
                                </dx:ASPxCallbackPanel>
                                <div class="clear"></div>
                                <br />
                                <div id="pngioHang" runat="server">
                                    <div style="height: 10px; width: 98%; border-top: 1px dashed"></div>

                                    <div style="float: right; margin-right: 20px">
                                        <a href="http://msmart.vn/">
                                            <img src="<%=pathUrl %>/Image/tieptucmuahang.PNG" />
                                           </a>
                                    </div>
                                    <div class="clear"></div>
                                    <div style="width: 100px; margin-top: -30px">
                                    
                                    </div>
                                    <div class="clear"></div>
                                    <div>
                                        Chú ý: Những đơn hàng trên 300.000 vnđ xẽ được giao miễn phí trong nội thành TP.HCM<br />
                                        Các đơn hàng còn lại vui lòng cộng thêm phí ship
                                    </div>
                                </div>
                                <div class="clear"></div>
                                <div id="divvien" runat="server" visible="false" style="border-top: 1px solid; width: 98%; margin-bottom: 5px"></div>
                            </asp:Panel>

                            <asp:Panel ID="pn2" runat="server">
                                <dx:ASPxLabel ID="ASPxLabel2" runat="server" Text="Thanh toán" Font-Bold="true" Font-Size="20pt"></dx:ASPxLabel>

                                <div style="height: 10px; width: 100%"></div>
                                <div class="clear"></div>
                                <div style="border: 1px dashed; width: 96%; padding-left: 10px; padding-right: 5px; padding-bottom: 10px">
                                    <div style="font-size: 15pt; font-weight: bold; margin-top: 5px; margin-bottom: 10px">Thông tin giao hàng</div>
                                    <div class="contentext1">Mã khuyến mại</div>
                                    <div class="contentext2">
                                        <dx:ASPxTextBox ID="txtMa" runat="server" Width="100px" Theme="DevEx" MaxLength="100">
                                        </dx:ASPxTextBox>
                                    </div>
                                    <div class="clear"></div>
                                    <div class="contentext1">Họ tên</div>
                                    <div class="contentext2">
                                        <dx:ASPxTextBox ID="txtHoten" runat="server" Width="250px" Theme="DevEx" MaxLength="100">
                                            <ValidationSettings Display="Dynamic" ValidateOnLeave="true" ValidationGroup="g1"
                                                RequiredField-IsRequired="true" RequiredField-ErrorText="Bạn chưa nhập họ và tên người nhận">
                                                <RequiredField IsRequired="True" ErrorText="Bạn chưa nhập họ v&#224; t&#234;n người nhận"></RequiredField>
                                            </ValidationSettings>
                                        </dx:ASPxTextBox>
                                    </div>
                                    <div class="clear"></div>
                                    <div class="contentext1">Tỉnh/ Thành</div>
                                    <div class="contentext2">
                                        <dx:ASPxComboBox ID="cbxTinh" runat="server" ValueType="System.Int32" Theme="DevEx" Width="170px" ValueField="ID" TextField="name">
                                            <ClientSideEvents ValueChanged="function(s, e) {cbxQua.PerformCallback();}" />
                                            <ValidationSettings RequiredField-IsRequired="true" Display="Dynamic" ValidationGroup="g1">
                                                <RequiredField IsRequired="True"></RequiredField>
                                            </ValidationSettings>
                                        </dx:ASPxComboBox>

                                    </div>
                                    <div class="clear"></div>

                                    <div class="contentext1">Quận/ Huyện</div>
                                    <div class="contentext2">

                                        <dx:ASPxComboBox ID="cbQuan" runat="server" ValueType="System.Int32" Theme="DevEx" Width="170px" ValueField="ID" TextField="name" ClientInstanceName="cbxQua" OnCallback="cbQuan_Callback">
                                            <ClientSideEvents ValueChanged="function(s, e) {cbxph.PerformCallback();}" />
                                            <ValidationSettings RequiredField-IsRequired="true" Display="Dynamic" ValidationGroup="g1">
                                                <RequiredField IsRequired="True"></RequiredField>
                                            </ValidationSettings>
                                        </dx:ASPxComboBox>

                                    </div>
                                    <div class="clear"></div>
                                    <div class="contentext1">Phường/ Xã</div>
                                    <div class="contentext2">

                                        <dx:ASPxComboBox ID="cbPhuong" runat="server" ValueType="System.Int32" Theme="DevEx" Width="170px" ClientInstanceName="cbxph" OnCallback="cbPhuong_Callback">
                                            <ValidationSettings RequiredField-IsRequired="true" Display="Dynamic" ValidationGroup="g1">
                                                <RequiredField IsRequired="True"></RequiredField>
                                            </ValidationSettings>
                                        </dx:ASPxComboBox>
                                        <asp:CompareValidator ID="CompareValidator1" runat="server" ErrorMessage="Xin vui lòng chọn quận/huyện" ControlToValidate="cbPhuong" Type="String" ValidationGroup="g1" Display="Dynamic" Operator="NotEqual" ValueToCompare="---Chọn phường/xã---"></asp:CompareValidator>
                                    </div>

                                    <div class="clear"></div>
                                    <div class="contentext1">Đường</div>
                                    <div class="contentext2">
                                        <dx:ASPxTextBox ID="txtDuong" runat="server" Width="250px" Theme="DevEx" MaxLength="100">
                                            <ValidationSettings Display="Dynamic" ValidateOnLeave="true" ValidationGroup="g1"
                                                RequiredField-IsRequired="true" RequiredField-ErrorText="Bạn chưa nhập tên đường">
                                                <RequiredField IsRequired="True" ErrorText="Bạn chưa nhập t&#234;n đường"></RequiredField>
                                            </ValidationSettings>
                                        </dx:ASPxTextBox>
                                    </div>
                                    <div class="clear"></div>
                                    <div class="contentext1">Số nhà</div>
                                    <div class="contentext2">
                                        <dx:ASPxTextBox ID="txtSonha" runat="server" Width="100px" Theme="DevEx" MaxLength="10">
                                            <ValidationSettings Display="Dynamic" ValidateOnLeave="true" ValidationGroup="g1"
                                                RequiredField-IsRequired="true" RequiredField-ErrorText="Bạn chưa nhập số nhà">
                                                <RequiredField IsRequired="True" ErrorText="Bạn chưa nhập số nh&#224;"></RequiredField>
                                            </ValidationSettings>
                                        </dx:ASPxTextBox>
                                    </div>
                                    <div class="clear"></div>
                                    <div class="contentext1">Điện thoại</div>
                                    <div class="contentext2">
                                        <dx:ASPxTextBox ID="txtDienthoai" runat="server" Width="150px" Theme="DevEx" MaxLength="20">
                                            <ValidationSettings Display="Dynamic" ValidateOnLeave="true" ValidationGroup="g1"
                                                RequiredField-IsRequired="true" RequiredField-ErrorText="Bạn chưa nhập số điện thoại">
                                                <RequiredField IsRequired="True" ErrorText="Bạn chưa nhập số điện thoại"></RequiredField>
                                            </ValidationSettings>
                                        </dx:ASPxTextBox>
                                    </div>
                                    <div class="clear"></div>
                                </div>
                                <div class="clear" style="margin-top: 10px"></div>
                                <div style="border: 1px dashed; width: 96%; padding-left: 10px; padding-right: 5px; padding-bottom: 10px">
                                    <div style="font-size: 15pt; font-weight: bold; margin-top: 5px; margin-bottom: 10px">Thanh toán và vận chuyển</div>
                                    <div style="width: 50%; float: left">
                                        <div style="font-weight: bold; font-size: 12pt">Chọn hình thức giao hàng</div>
                                        <div style="border-top: 1px dashed; width: 90%; margin-bottom: 5px"></div>
                                        <dx:ASPxRadioButton ID="rdb1" runat="server" Text="Giao hàng tận nơi - (1-3) ngày" Font-Bold="true" Checked="true" Theme="DevEx"></dx:ASPxRadioButton>
                                    </div>
                                    <div style="width: 50%; float: left">
                                        <div style="font-weight: bold; font-size: 12pt">Chọn hình thức thanh toán</div>
                                        <div style="border-top: 1px dashed; width: 90%"></div>
                                        <div class="textLeft_10">
                                            <dx:ASPxRadioButton ID="rdbGiaotien" runat="server" Checked="true" Theme="DevEx" GroupName="gr1"></dx:ASPxRadioButton>
                                        </div>
                                        <div class="textLeft_5">
                                            <img src="<%=pathUrl %>/Image/icon/payment.png" alt="payment" />
                                        </div>
                                        <div class="textLeft_10">Thanh toán tiền mặt (miễn phí)</div>
                                        <div class="clear"></div>

                                        <div class="textLeft_10">
                                            <dx:ASPxRadioButton ID="rdbNganluong" runat="server" Theme="DevEx" GroupName="gr1">
                                            </dx:ASPxRadioButton>
                                        </div>
                                        <div class="textLeft_5">
                                            <img src="<%=pathUrl %>/Image/icon/credit_card.png" alt="ATM Card" />
                                        </div>
                                        <div class="textLeft_10">Cổng thanh toán Ngân lượng</div>
                                        <div class="clear"></div>

                                        <div class="textLeft_10">
                                            <dx:ASPxRadioButton ID="rdbbaokim" runat="server" Theme="DevEx" GroupName="gr1"></dx:ASPxRadioButton>
                                        </div>
                                        <div class="textLeft_5">
                                            <img src="<%=pathUrl %>/Image/icon/credit_card_visa.png" width="32" height="32" alt="visa" />
                                        </div>

                                        <div class="textLeft_10">Cổng thanh toán Bảo kim</div>
                                        <div class="clear"></div>



                                    </div>

                                    <div class="clear"></div>
                                </div>
                                <div class="clear" style="margin-top: 10px"></div>
                                <div style="border: 1px dashed; width: 96%; padding-left: 10px; padding-right: 5px; padding-bottom: 10px">
                                    <div style="font-size: 15pt; font-weight: bold; margin-top: 5px; margin-bottom: 10px">Ghi chú</div>

                                    <dx:ASPxMemo ID="txtNote" runat="server" Height="100px" Width="100%" Theme="DevEx"></dx:ASPxMemo>

                                    <div class="clear"></div>
                                </div>
                                <div style="border-top: 1px solid; width: 98%; margin-bottom: 10px; margin-top: 20px"></div>

                                <center>
                                    <dx:ASPxLabel ID="lbthongbao" runat="server" Text="" ></dx:ASPxLabel>
                                <dx:ASPxButton ID="btnOK" runat="server" Text="Đặt mua" AutoPostBack="false" Theme="iOS"  ValidationGroup="g1" OnClick="btnOK_Click"></dx:ASPxButton>
                                   </center>
                                <div class="clear"></div>
                            </asp:Panel>

                       
          

                <div class="clear"></div>
                <div class="clear" style="height: 20px"></div>
            </div>
        </div>
        <div>
            <a href="#">
                <img src="<%=pathUrl %>/Image/icon/tuyendung.gif" width="200" style="margin-left: 10px" />
            </a>
        </div>
    </div>
</div>
<asp:HiddenField ID="hdfgia" runat="server" />
